package com.SSII.otrapru;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;

public class Splash extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash);
		
		esperar();
	}

	public void esperar(){
		Thread timer= new Thread(){/**Crear un hilo de ejecucion **/
			public void run(){
				try {
					sleep(2000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				finally{
					Intent intent=new Intent(Splash.this,Principal.class);
					startActivity(intent);
				}
			}
		};
		timer.start();
	}

	protected void onPause(){
		super.onPause();
		finish();
	}
}